<?php
ini_set('auto_detect_line_endings',true);
echo '<pre>';
echo var_dump(PHP_EOL);
echo '</pre>';

use UC_PHP\FileSystem;

$file = FileSystem::open_text_file(
    '/test_dir/streamtest1.txt', IO_Mode::FOR_READING);

while(! $file->at_end_of_stream())
{
    if(! $file->at_end_of_line())
    {
        echo $file->read(1);
    }
    else
    {
        $file->read(2);
        echo ' *** EOL character here *** ';
    }
}
